﻿using System.Windows;
using eWallet.Windows.Controls;

namespace WPFTestArena
{
	/// <summary>
	/// Interaction logic for TagCloudWindow.xaml
	/// </summary>
	public partial class TagCloudWindow : Window
	{
		public TagCloudWindow()
		{
			InitializeComponent();

			this.PopulateTags();
		}

		private void PopulateTags()
		{
			this.TagCloud.Items.Add(new Tag("username", 5));
			this.TagCloud.Items.Add(new Tag("password", 10));
			this.TagCloud.Items.Add(new Tag("live.com", 7));
			this.TagCloud.Items.Add(new Tag("google", 3));
			this.TagCloud.Items.Add(new Tag("codeplex", 2));
			this.TagCloud.Items.Add(new Tag("tfs", 12));
		}

		private void TagCloud_TagClicked(object sender, ItemClickedEventArgs e)
		{

		}

		private void ClearButton_Click(object sender, RoutedEventArgs e)
		{
			this.TagCloud.Items.Clear();
		}

		private void PopulateButton_Click(object sender, RoutedEventArgs e)
		{
			this.PopulateTags();
		}

		private void ShowHideInitialSelection_Click(object sender, RoutedEventArgs e)
		{
			this.TagCloud.ShowInitialSelectedLabel = !this.TagCloud.ShowInitialSelectedLabel;
		}

	}
}
